# -*- coding:utf-8 -*-

"""
众安
"""
from aw import *
from autotest import *


class Test_zhongan_03(TestCase):
    def setUp(self):
        print("Test_001 setUp")

    def test(self):
        Common.writeRule2file("Test_zhongan_03")
        Common.setRule("Test_zhongan_16")

        """
FDS_QZ08007	1095	FDS_QZ08007近7天众安申请全部失败	近7天众安申请次数	"同时满足以下条件时，响应规则
A、近7天众安申请次数>4
B、近7天众安放款机构数=0"	D	福贷-授信决策点8	D30


        """

        ruleStr = "近7天众安放款机构数=0"
        Common.showRuleVariable(ruleStr)

        # 5 调用进件脚本
        Common.execFile(r'D:\dev\接口代码\AssetAutoTest\fudai\FDCreditChain.py')

        # 6 检查数据库结果
        expectVaule = {"result_code": "D30", "rule_result": "D", "rule_code": "FDS_QZ08007"}
        Common.checkResult(expectVaule, times=5)

    def tearDown(self):
        print("Test_001 tearDown")
